const ResponseEntity = {
  setEneity: options => {
    if (!options) {
      options = {
        res: res,
        status: '200',
        message: 'success',
        data: []
      }
    } else {
      options.status = options.status ? options.status : '200'
      options.message = options.message ? options.message : 'success'
      options.data = options.data ? options.data : []
    }
    return options.res.status(200).json({
      status: options.status,
      message: options.message,
      result: options.data,
      success: true
    })
  }
}

module.exports = ResponseEntity
